//
//  MainOneCollectionViewCell.m
//  KaKaWallet
//
//  Created by admin on 2016/10/26.
//  Copyright © 2016年 ibendi. All rights reserved.
//

#import "MainOneCollectionViewCell.h"

@implementation MainOneCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super  initWithFrame:frame];
    if (self) {
        
        self.contentView.backgroundColor = [UIColor whiteColor];
        
        self.kkImgView = [UIImageView new];
        [self.contentView addSubview:self.kkImgView];
        
        self.kkTitleLbl = [UILabel new];
        [self.contentView addSubview:self.kkTitleLbl];
        
        self.kkTitleLbl.textColor = UIColorHex(0x333333);
        self.kkTitleLbl.font = [UIFont systemFontOfSize:14];
        
        self.kkImgView.backgroundColor = [UIColor yellowColor];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    [self.kkImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.left.mas_equalTo(self.contentView.mas_left).offset(30);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];
    
    [self.kkTitleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.kkImgView);
        make.left.mas_equalTo(self.kkImgView.mas_right).offset(20);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-5);
        make.height.mas_equalTo(@25);
    }];
    
    
    
}

@end
